import url from '@/tool/index.js'
//消息中心
export const news = (page=1) => { //
	return new Promise(resolve => {
		uni.request({
			url: url + '/api/user.user/mywinmsd',
			data: {
				page:page,
				token: uni.getStorageSync('userToken')
			},
			header:{
				'Content-Type':'application/x-www-form-urlencoded'
			},
			method: 'POST',
			success: (res) => resolve(res.data),
		});
	})
}
//消息已读
export const alreadyRead = (winmsdids) => { //
	return new Promise(resolve => {
		uni.request({
			url: url + '/api/user.user/mywinmsdChange',
			data: {
				winmsdids: winmsdids,
				token:uni.getStorageSync('userToken')
			},
			header:{
				'Content-Type':'application/x-www-form-urlencoded'
			},
			method: 'POST',
			success: (res) => resolve(res.data),
		});
	})
}
//消息删除
export const del = (winmsdids) => { //
	return new Promise(resolve => {
		uni.request({
			url: url + '/api/user.user/mywinmsdDel',
			data: {
				winmsdids: winmsdids,
				token:uni.getStorageSync('userToken')
			},
			header:{
				'Content-Type':'application/x-www-form-urlencoded'
			},
			method: 'POST',
			success: (res) => resolve(res.data),
		});
	})
}
